<div id="dhh-clearCache" class="show_page_content" style=''>
    <div class="top_btn" style="float:left;">
        <div class="layui-btn input-line" id="dhh-clearCache-btn"><i class="layui-icon layui-icon-delete"></i>清除</div>
    </div>
</div>
<script>
    $("#dhh-clearCache-btn").on("click", function() {
        $.ajax({
            url: "/settings/clean_action",
            type: "post",
            dataType: "json",
            beforeSend: function() {
                loadIndex = layer.load(0);
            },
            success: function(d) {
                layer.close(loadIndex);
                if (d.result == "1") {
                    layer.msg("清理成功！", {
                        icon: 1,
                        time: 2000
                    });
                } else {
                    layer.msg("清理失败！", {
                        icon: 2,
                        time: 2000
                    });
                }
            },
            error: function() {
                layer.close(loadIndex);
                layer.msg("网络异常！", {
                    icon: 2,
                    time: 2000
                });
            }
        });
    });
</script>